﻿open System
open System.IO
open Microsoft.FSharp.Text.Lexing

open TinyJava.Ast
open Lexer
open Parser
open Environment

let Compile() =
  let inputChannel = new StreamReader("Program.tj")
  let lexbuf = LexBuffer<char>.FromTextReader inputChannel
  let ast = Parser.start Lexer.tokenize lexbuf //parse the file and create the AST

  //init the symbol table with classes and their members
  let table = fill_table ast
  1

Compile()